<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.faceted.search.dm.actions.override">

  <require>org.nuxeo.ecm.platform.faceted.search.dm.actions</require>

  <extension point="actions" target="org.nuxeo.ecm.platform.actions.ActionService">

    <!-- Search actions -->

    <action id="facetedSaveSearchAction" label="command.save" link="#{facetedSearchActions.saveSearch()}" order="10">
    </action>

    <!-- Saved searches -->
    <action id="FacetedSavedSearches" label="label.home.faceted.saved.searches" link="/incl/faceted_saved_searches.xhtml" order="0" type="home_rest_document_link">
      <category>SavedSearches_sub_tab</category>
      <filter-id>not_readonly</filter-id>
    </action>

    <action confirm="if( !confirmDeleteDocumentsForever() ) return false;" help="comand.deleteDocs.help" icon="" id="facetedSearchCurrentSelectionDelete" label="command.trashDocs" link="#{deleteActions.purgeSelection('FACETED_SAVED_SEARCHES_CURRENT_SELECTION')}">
      <category>FACETED_SAVED_SEARCHES_CURRENT_SELECTION_LIST</category>
      <filter id="canDeleteFacetedSavedSearches">
        <rule grant="true">
          <condition>#{deleteActions.getCanDelete('FACETED_SAVED_SEARCHES_CURRENT_SELECTION')}</condition>
        </rule>
      </filter>
    </action>

    <action id="TAB_MY_SUBSCRIPTIONS">
      <filter-id>denyForFacetedSearch</filter-id>
    </action>

    <action id="TAB_MANAGE_SUBSCRIPTIONS">
      <filter-id>denyForFacetedSearch</filter-id>
    </action>

    <action id="TAB_RELATIONS">
      <filter-id>denyForFacetedSearch</filter-id>
    </action>

  </extension>

</component>
